<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>slice</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: #34495e;
        }

        img {
            width: 80%;
            height: 700px;
            margin: 25px auto;
            display: flex;
        }

        .slideshow {
            overflow: hidden;
        }

        .middle {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .navigation {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
        }

        .bar {
            width: 50px;
            height: 10px;
            border: 2px solid #fff;
            margin: 6px;
            cursor: pointer;
            transition: 0.4s;
        }

        .bar:hover {
            background: #fff;
        }

        input[name="r"] {
            position: absolute;
            visibility: hidden;
        }

        .slides {
            width: 500%;
            height: 100%;
            display: flex;
        }

        .slide {
            width: 20%;
            transition: 0.6s;
        }

        #r1:checked~.s1 {
            margin-left: 0;
        }

        #r2:checked~.s1 {
            margin-left: -20%;
        }

        #r3:checked~.s1 {
            margin-left: -40%;
        }

        #r4:checked~.s1 {
            margin-left: -60%;
        }

        #r5:checked~.s1 {
            margin-left: -80%;
        }
    </style>
</head>

<body>
    <div class="slideshow middel">
        <div class="slides">
            <input type="radio" name="r" id="r1" checked>
            <input type="radio" name="r" id="r2">
            <input type="radio" name="r" id="r3">
            <input type="radio" name="r" id="r4">
            <input type="radio" name="r" id="r5">
            <div class="slide s1">
                <img src="img1.jpg" alt="">
            </div>
            <div class="slide">
                <img src="img2.jpg" alt="">
            </div>
            <div class="slide">
                <img src="img3.jpg" alt="">
            </div>
            <div class="slide">
                <img src="img4.jpg" alt="">
            </div>
            <div class="slide">
                <img src="img5.jpg" alt="">
            </div>
        </div>
        <div class="navigation">
            <label for="r1" class="bar"></label>
            <label for="r2" class="bar"></label>
            <label for="r3" class="bar"></label>
            <label for="r4" class="bar"></label>
            <label for="r5" class="bar"></label>
        </div>
    </div>
</body>

</html>